﻿namespace OasisCiq.Xpil
{
    using System;
    using System.Linq;

    /// <summary>
    /// List of information types used for describing a vehicle
    /// </summary>
    public class VehicleInfoElementList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[] 
        {
            "Make", // Free text make description, e.g. Toyota, Ford
            "Model", // Free text model description, e.g. Pajero, Falcon, etc. May include make as in Ford Falcon or Mitsubishi Pajero. If the make information is included then do not put the make as a separate element qualified with Make.
            "ManufactureDate", // Free text data which can be a full date or a year.
            "EngineNumber", // Free text engine number
            "ChassisNumber", // Free text chassis number
            "BodyNumber", // Free text body number
            "LicensePlateNumber", // Free text license plate number
            "LicensePlateType", // Number plate types are different. e.g. standard, premier, diplomat, etc
            "Colour",
            "BodyType", // Type of body. e.g. Sedan, Ute, Station wagon, 2 door, etc
            "Type" // Use this if the enumeration list for type of vehicle is not used.
        };

        public VehicleInfoElementList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}